<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>

<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme() + "://"
		+ request.getServerName() + ":" + request.getServerPort()
		+ path + "/";
%> 
<style>
.none{
display:none;}
</style> 
<!-- ===============================从后台传过来的数据 ========================-->
<div class="none">
	<div id="currentPage">${page}</div>
	<div id="totalPages">${totoalPage}</div>
	<div id="currentCocourseCode">${cocourseCode}</div>
	<div id="currentCid">${cid}</div>
</div>
<!-- ===============================主要内容===================================== -->
<div class="Box" style="margin-top:15px;"  >
    <!-- ============================ 条件选项====================================-->
	<div class="funxtion Box-head Border " style="padding-top:20px;padding-bottom:20px;margin-bottom:10px;">
			<div class="span3 offset1 ">
				<select id="courseName">
				   <option value='0'>请选择考试课程</option>
					<c:forEach var="coName" items="${courseName}">
						<option value=${coName.cocourseCode}>${coName.coname}</option>
					</c:forEach>
				</select>
			</div>
			<div class="span4 offset1">
				<select id="classes">
                  <option value='0'>请选择班级</option>
				</select>
			</div>
			<div class="span1">
					<input type="button" id="click_btn" value="确定" class="btn btn-info click_btn">
			</div>
	</div>

	<!-- ==============================考试题目==================================== -->
	<div>
		<c:forEach items="${topicList}" var="topic" varStatus="i">
			<div class="well radioGroup">
				<p>${i.count}&nbsp;&nbsp; ${topic.ttopic}</p>
				<p>
					<input type="radio" name="tp${i.index}" value="0">A:${topic.ansList[0]}<br/>
					<input type="radio" name="tp${i.index}" value="1">B:${topic.ansList[1]}<br/>
					<input type="radio" name="tp${i.index}" value="2">C:${topic.ansList[2]}<br/>
					<input type="radio" name="tp${i.index}" value="3">D:${topic.ansList[3]}<br/>
				</p>
			</div>
		</c:forEach>
		<div>
		<input type="button" id="submit_answers" class="btn btn-info none" value="提交答案"> 
		</div>
	</div>
</div>

<!--弹出时间提示-->
<div id="Javascript.RightDiv" style="position: absolute;z-index:1000;width:200px;height:30px;top:-1000px;word-break:break-all;display:none;">
<div id="timeshow" style="width:200px;height:20px;line-height:20px;text-align:center;font-size:12px;color:#000;background-color:#CCC;border:1px solid #333;"></div>
</div>
<SCRIPT LANGUAGE="JavaScript">
//弹出div
var showad = true;
var Toppx = 10;    //上端位置
var AdDivW = 200;   //宽度
var AdDivH = 25;   //高度
var PageWidth = 750; //页面多少宽度象素下正好不出现左右滚动条
var MinScreenW = 1000; //最小屏幕宽度象素
function scall(){
if(!showad){return;}
var Borderpx = ((window.screen.width-PageWidth)/2-AdDivW)/2;
document.getElementById("Javascript.RightDiv").style.display="";
document.getElementById("Javascript.RightDiv").style.top=document.body.scrollTop+Toppx;
document.getElementById("Javascript.RightDiv").style.left=document.body.scrollLeft+document.body.clientWidth-document.getElementById("Javascript.RightDiv").offsetWidth-Borderpx;
}
window.onscroll=scall;
window.onresize=scall;
 
//在线考试时间提示
var h=1; //设置考试时间(小时单位)  
var m=0.1; //设置考试时间(分钟单位)  
var timeShowId="timeshow"; //设置时间显示层ID  
var TimeNum=h*60*60+m*60;  
var timeStr;  
function ChangeTime()
{
  TimeNum--;
   
    if(TimeNum > 0)
    {
       timeStr=setTimeout("ChangeTime()",1000);
       if(TimeNum<300)
       {
         alert('距离系统自动提交时间还剩5分钟，请尽快做好提交准备');
       }
        if(TimeNum<30)
       {
         alert('距离系统自动提交时间还剩30秒，请马上交卷');
       }
    }
    else
    {  
       //系统提交  完善
    }  
    document.getElementById(timeShowId).innerHTML="系统提示：你的时间还剩<span style=\"color:#FF0000;\">"+Math.floor(TimeNum/60)+"分"+TimeNum%60+"秒</span>";
} 
</SCRIPT>
<script src="<%=basePath%>JS/Topic.js"></script>
	